import request from "@/utils/request";

export function listAllMenu(data) {
    return request({
        url: '/uum-admin/api/v1/menu/list',
        method: 'get',
        params: data
    })
}


export function menuDetail(id) {
    return request({
        url: '/uum-admin/api/v1/menu/detail',
        method: 'get',
        params: {id}
    })
}

export function select() {
    return request({
        url: '/uum-admin/api/v1/menu/select',
        method: 'get'
    })
}

export function addMenu(data) {
    return request({
        url: '/uum-admin/api/v1/menu/add',
        method: 'post',
        data
    })
}

export function updateMenu(data) {
    return request({
        url: '/uum-admin/api/v1/menu/update',
        method: 'put',
        data
    })
}

export function deleteMenu(id) {
    return request({
        url: '/uum-admin/api/v1/menu/deleteMenu',
        method: 'delete',
        params: {id}
    })
}

export function deleteMenuTree(id) {
    return request({
        url: '/uum-admin/api/v1/menu/deleteMenuTree',
        method: 'delete',
        params: {id}
    })
}


